home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Development / WarpSDL / Install < prev    next >
Encoding:
Text File  |  2002-10-27  |  6.4 KB  |  242 lines

  1. ; $VER: Installation script for WarpSDL 0.4 (24. October 2002)
  2. ; © Adam Waldenberg
  3.  
  4. ; REMOVE BELOW FOR PRE-44 INSTALLER!
  5.  
  6.  
  7. ; check if we are running under correct OS
  8.  
  9. (if (= 0 1)
  10.  
  11.     (
  12.         (effect "center" "horizontal" $889999 $ffffff)
  13.     )
  14. )
  15.  
  16. (if (< (/ (getversion) 65536) 39)
  17.  
  18.     (
  19.         (abort "Sorry, WarpSDL requires AmigaOS V39 or better!")
  20.     )
  21. )
  22.  
  23. ; error handling
  24.  
  25. (onerror
  26.  
  27.     (if (> @ioerr 0)
  28.  
  29.         (
  30.             (message
  31.                 ("An error occurred during installation.")
  32.             )
  33.         )
  34.     )
  35.  
  36.     (exit (quiet))
  37. )
  38.  
  39. (welcome
  40.     "Welcome to the installation of WarpSDL, the SDL compatible "
  41.     "media library for AmigaOS computers.\n\nCopyright © 2002 Adam Waldenberg."
  42. )
  43.  
  44.     ; code follows.
  45.     (copylib
  46.         (prompt "Installing warpsdl.library.")
  47.         (help "Will copy the main library to your LIBS: directory.")
  48.         (confirm "average")
  49.         (source "warpsdl.library")
  50.         (dest "LIBS:")
  51.  
  52.         (optional
  53.             "fail"
  54.             "askuser"
  55.         )
  56.     )
  57.  
  58.     (set @default-dest (cat "LIBS:"))
  59.  
  60.     (makedir "ENV:WarpSDL")
  61.     (makedir "ENVARC:WarpSDL")
  62.  
  63.     (COMPLETE 20)
  64.  
  65.     (set #globalstr
  66.         (cat
  67.             "(If you installed a previous version of WarpSDL it is fetched from "
  68.             "your ENV: dir, otherwhise the recommended value is set.)"
  69.         )
  70.     )
  71.  
  72.     (set #globhelpstr
  73.         (cat
  74.             "On PPC the priority values are translated into NICE values by subtracting "
  75.             "the priority with (priority*2) and then dividing it with 5. So setting "
  76.             "the priority to 5, will give you a PPC task that has the nicevalue -1. "
  77.             "Setting it to 100-128 will give you a PPC task with the nicevalue -20, "
  78.             "and so on.\n\n"
  79.             "Setting the DEF_MOTHERTASK_PRI higher than DEF_SUBTASK_PRI can result in "
  80.             "sound that 'cuts' (if cpu consumption is at max).\n\n"
  81.             "Setting the DEF_SUBTASK_PRI higher than DEF_MOTHERTASK_PRI can result in "
  82.             "the game runing slower (if cpu consumption is at max), as the maintask won't "
  83.             "get all the cpu power it might need.\n\n"
  84.             "Recommended is to set both values the same or just use the defaults."
  85.         )
  86.     )
  87.  
  88.     (if (= (exists "ENV:warpsdl/DEF_MOTHERTASK_PRI") 0)
  89.         (
  90.             (set #envstr (cat "0"))
  91.         )
  92.         (
  93.             (set #envstr
  94.                 (cat
  95.                     (getenv
  96.                         "warpsdl/DEF_MOTHERTASK_PRI"
  97.                     )
  98.                 )
  99.             )
  100.         )
  101.     )
  102.  
  103.     (set #result
  104.         (askstring
  105.             (prompt
  106.                 "What do you want to set the warpsdl/DEF_MOTHERTASK_PRI env-variable to? "
  107.                 #globalstr
  108.             )
  109.  
  110.             (help
  111.                 "This is what the default priority of the main/mothertasks that use WarpSDL "
  112.                 "will be set to. Unless they override it, that priority will be used.\n\n"
  113.                 #globhelpstr
  114.             )
  115.  
  116.             (default #envstr)
  117.         )
  118.     )
  119.  
  120.     (run "setenv ENV:WarpSDL/DEF_MOTHERTASK_PRI" #result)
  121.     (run "setenv ENVARC:WarpSDL/DEF_SUBTASK_PRI" #result)
  122.  
  123.     (COMPLETE 50)
  124.  
  125.     (if (= (exists "ENV:warpsdl/DEF_SUBTASK_PRI") 0)
  126.         (
  127.             (set #envstr (cat "5"))
  128.         )
  129.         (
  130.             (set #envstr
  131.                 (cat
  132.                     (getenv
  133.                         "warpsdl/DEF_SUBTASK_PRI"
  134.                     )
  135.                 )
  136.             )
  137.         )
  138.     )
  139.  
  140.     (set #result
  141.         (askstring
  142.             (prompt "What do you want to set the warpsdl/DEF_SUBTASK_PRI env-variable to? "
  143.                     #globalstr
  144.             )
  145.  
  146.             (help
  147.                 "This is what the default priority of the subtasks that use WarpSDL "
  148.                 "will be set to. Unless they override it, that priority will be used.\n\n"
  149.                 #globhelpstr
  150.             )
  151.  
  152.             (default #envstr)
  153.         )
  154.     )
  155.  
  156.     (run "setenv ENV:WarpSDL/DEF_SUBTASK_PRI" #result)
  157.     (run "setenv ENVARC:WarpSDL/DEF_SUBTASK_PRI" #result)
  158.  
  159.     (COMPLETE 70)
  160.  
  161.     (if (= (exists "ENV:warpsdl/DEF_CD0_NAME") 0)
  162.         (
  163.             (set #envstr (cat "CD0:"))
  164.         )
  165.         (
  166.             (set #envstr
  167.                 (cat
  168.                     (getenv
  169.                         "warpsdl/DEF_CD0_NAME"
  170.                     )
  171.                 )
  172.             )
  173.         )
  174.     )
  175.  
  176.     (set #result
  177.         (askstring
  178.             (prompt "What do you want to set the warpsdl/DEF_CD0_NAME env-variable to? "
  179.                     #globalstr
  180.             )
  181.  
  182.             (help
  183.                 "Used to configure and show warpsdl where your primary CD drive is.\n"
  184.                 "Most often, applications use the primary drive, so setting DEF_CD0_NAME "
  185.                 "to \"CD4:\" will tell warpsdl applications to use CD4: as the primary "
  186.                 "CD drive.\n\n"
  187.  
  188.                 "If you don't set DEF_CD0_NAME you tell warpsdl applications that you "
  189.                 "don't have a primary drive.\n\n"
  190.  
  191.                 "You may set any DEF_CDX_NAME variable, where X is a number between 0-15. "
  192.                 "DEF_CD0... is the primary and DEF_CD1... is the secondary, and so on."
  193.             )
  194.  
  195.             (default #envstr)
  196.         )
  197.     )
  198.  
  199.     (run "setenv ENV:WarpSDL/DEF_CD0_NAME" #result)
  200.     (run "setenv ENVARC:WarpSDL/DEF_CD0_NAME" #result)
  201.  
  202.     (if (= (exists "ENV:warpsdl/DEF_FORCEDBUFFAGA") 0)
  203.         (
  204.             (set #envstr (cat "0"))
  205.         )
  206.         (
  207.             (set #envstr
  208.                 (cat
  209.                     (getenv
  210.                         "warpsdl/DEF_FORCEDBUFFAGA"
  211.                     )
  212.                 )
  213.             )
  214.         )
  215.     )
  216.  
  217.     (set #result
  218.         (askstring
  219.             (prompt "What do you want to set the warpsdl/DEF_FORCEDBUFFAGA env-variable to? "
  220.                     #globalstr
  221.             )
  222.  
  223.             (help
  224.         "Use this to force WarpSDL to use doublebuffering on AGA screens even "
  225.         "if the application is made for single-buffering. This is done by storing "
  226.                 "the updated buffer in a \"scratchbuffer\"... This scratchbuffer is later "
  227.                 "applied to the old frame... Letting the application use the doublebuffered "
  228.                 "screen as a single-buffered one. :)... This can cause a slowdown when "
  229.                 "full-screen updates occur."
  230.             )
  231.  
  232.             (default #envstr)
  233.         )
  234.     )
  235.  
  236.     (run "setenv ENV:WarpSDL/DEF_FORCEDBUFFAGA" #result)
  237.     (run "setenv ENVARC:WarpSDL/FORCEDBUFFAGA" #result)
  238.  
  239.     (COMPLETE 100)
  240.  
  241. (exit)
  242.